package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.factory.RemoteDriverFallbackFactory;
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
import com.ruoyi.system.api.model.LoginDriver;
import com.ruoyi.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "RemoteDriverService", value = ServiceNameConstants.VEHICLE_DRIVER, fallbackFactory = RemoteDriverFallbackFactory.class)
public interface RemoteDriverService
{
    /**
     * 通过手机号查询用户信息
     *
     * @param mobile 手机号
     * @param source 请求来源 @RequestHeader(SecurityConstants.FROM_SOURCE) String source
     * @return 结果
     */
    @GetMapping("/driver/getDataByMobile/{mobile}")
    public LoginDriver getDataByMobile(@PathVariable("mobile") String mobile);

    @PostMapping("/driver/register")
    public LoginDriver register(@RequestBody LoginDriver loginDriver);
}
